package c.mars.tower_of_hanoi.game;

import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;
import android.opengl.GLSurfaceView;

public class GameActivity extends Activity {

	private GLSurfaceView mGLView;
	public static volatile int rodsCount;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		mGLView = new GameGLSurfaceView(this);
        setContentView(mGLView);
	}
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event)  {
//		Handling of hardware key "back"
		if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
			finish();
			return true;
		}

		return super.onKeyDown(keyCode, event);
	}
}